package com.manage.project.biz.service.impl;

import java.util.List;
import com.manage.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.manage.project.biz.mapper.BizJidiansheshiguzhangyuebaobiaoMapper;
import com.manage.project.biz.domain.BizJidiansheshiguzhangyuebaobiao;
import com.manage.project.biz.service.IBizJidiansheshiguzhangyuebaobiaoService;

/**
 Service业务层处理
 *
 * @author liang
 *
 */
@Service
public class BizJidiansheshiguzhangyuebaobiaoServiceImpl implements IBizJidiansheshiguzhangyuebaobiaoService
{
    @Autowired
    private BizJidiansheshiguzhangyuebaobiaoMapper bizJidiansheshiguzhangyuebaobiaoMapper;

    /**
     * 查询机电设施故障月报
     *
     * @param id 机电设施故障月报主键
     * @return 机电设施故障月报
     */
    @Override
    public BizJidiansheshiguzhangyuebaobiao selectBizJidiansheshiguzhangyuebaobiaoById(Long id)
    {
        return bizJidiansheshiguzhangyuebaobiaoMapper.selectBizJidiansheshiguzhangyuebaobiaoById(id);
    }

    /**
     * 查询机电设施故障月报列表
     *
     * @param bizJidiansheshiguzhangyuebaobiao 机电设施故障月报
     * @return 机电设施故障月报
     */
    @Override
    public List<BizJidiansheshiguzhangyuebaobiao> selectBizJidiansheshiguzhangyuebaobiaoList(BizJidiansheshiguzhangyuebaobiao bizJidiansheshiguzhangyuebaobiao)
    {
        return bizJidiansheshiguzhangyuebaobiaoMapper.selectBizJidiansheshiguzhangyuebaobiaoList(bizJidiansheshiguzhangyuebaobiao);
    }

    /**
     * 新增机电设施故障月报
     *
     * @param bizJidiansheshiguzhangyuebaobiao 机电设施故障月报
     * @return 结果
     */
    @Override
    public int insertBizJidiansheshiguzhangyuebaobiao(BizJidiansheshiguzhangyuebaobiao bizJidiansheshiguzhangyuebaobiao)
    {
        bizJidiansheshiguzhangyuebaobiao.setCreateTime(DateUtils.getNowDate());
        return bizJidiansheshiguzhangyuebaobiaoMapper.insertBizJidiansheshiguzhangyuebaobiao(bizJidiansheshiguzhangyuebaobiao);
    }

    /**
     * 修改机电设施故障月报
     *
     * @param bizJidiansheshiguzhangyuebaobiao 机电设施故障月报
     * @return 结果
     */
    @Override
    public int updateBizJidiansheshiguzhangyuebaobiao(BizJidiansheshiguzhangyuebaobiao bizJidiansheshiguzhangyuebaobiao)
    {
        bizJidiansheshiguzhangyuebaobiao.setUpdateTime(DateUtils.getNowDate());
        return bizJidiansheshiguzhangyuebaobiaoMapper.updateBizJidiansheshiguzhangyuebaobiao(bizJidiansheshiguzhangyuebaobiao);
    }

    /**
     * 批量删除机电设施故障月报
     *
     * @param ids 需要删除的机电设施故障月报主键
     * @return 结果
     */
    @Override
    public int deleteBizJidiansheshiguzhangyuebaobiaoByIds(Long[] ids)
    {
        return bizJidiansheshiguzhangyuebaobiaoMapper.deleteBizJidiansheshiguzhangyuebaobiaoByIds(ids);
    }

    /**
     * 删除机电设施故障月报信息
     *
     * @param id 机电设施故障月报主键
     * @return 结果
     */
    @Override
    public int deleteBizJidiansheshiguzhangyuebaobiaoById(Long id)
    {
        return bizJidiansheshiguzhangyuebaobiaoMapper.deleteBizJidiansheshiguzhangyuebaobiaoById(id);
    }
}
